/**
 * 斐波那契
 * @param x
 * @returns {number|*}
 */
function fun(x) {
    if (x === 0) {
        return 0
    }
    else if (x === 1) {
        return 1
    }
    else {
        return fun(x-1) + fun(x-2)
    }
}



var onmessage = function (event) {
    postMessage( fun(event.data) ) 
}
